#include"StateWidgets.h"
NodeStateWidget::NodeStateWidget(QWidget*parent):
    QWidget(parent){
    createWidgets();
    createLayout();
    //setFixedSize(minimumSizeHint());
}
void NodeStateWidget::createWidgets(){
//    DeviceNameEdit=new QLineEdit;
//    DeviceDescriptionEdit=new QLineEdit;
//    ValueEdit=new QLineEdit;
//    TimeEdit=new QLineEdit;
//    AdressEdit=new QLineEdit;
    m_edit = new QTextEdit;
}
void NodeStateWidget::createLayout(){
   // QFormLayout*layout=new QFormLayout;
//    layout->addRow(tr("DeviceName:"),DeviceNameEdit);
//    layout->addRow(tr("DeviceAdress:"),AdressEdit);
//    layout->addRow(tr("Description:"), DeviceDescriptionEdit);
//    layout->addRow(tr("Value:"),ValueEdit);
//    layout->addRow(tr("Time"),TimeEdit);
    QHBoxLayout *layout = new QHBoxLayout;
    layout->addWidget(m_edit);
    setLayout(layout);
}
void NodeStateWidget::apendContent(const QString &con)
{
    m_edit->append(con);
}
void NodeStateWidget::clearAll()
{
    m_edit->clear();
}
//void NodeStateWidget::setDescription(const QString &Description){
//    DeviceDescriptionEdit->setText(Description);
//}
//void NodeStateWidget::setTime(const QString &time){
//    TimeEdit->setText(time);
//}
//void NodeStateWidget::setValue(int value){
//    ValueEdit->setText(QString::number(value));
//}
//void NodeStateWidget::setAdress(const QString &Adress){
//    AdressEdit->setText(Adress);

//}
//void NodeStateWidget::setName(const QString &name){
//    DeviceNameEdit->setText(name);
//}
